﻿using Acme.BookStore.FormWhx.Ruku;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Application.Services;

namespace Acme.BookStore.FormWhxDto.RukuDto
{
    public interface IRuKuService:ICrudAppService<RuKuModelDto, Guid, PagedAndSortedResultRequestDto, CreateUpdateRuKuDto>
    {
        /// <summary>
        /// 获取所有类型枚举
        /// </summary>
        /// <returns></returns>
        Task<ListResultDto<RuTypeDto>> GetTypeAsync();
        public class RuTypeDto
        {
            public int Id { get; set; }
            public string Name { get; set; }
        }
        /// <summary>
        /// 获取所有库位  枚举
        /// </summary>
        /// <returns></returns>
        Task<ListResultDto<StatusDto>> GetStatusDtoAsync();
        public class StatusDto
        {
            public int Id { get; set; }
            public string Name { get; set; }
        }

        /// <summary>
        /// 获取仓库名称  下拉
        /// </summary>
        /// <returns></returns>
        Task<ListResultDto<StorehouseDto.StorehouseDto>> GetStorehouseDtoAsync();
        /// <summary>
        /// 获取关联单号  下拉
        /// </summary>
        /// <returns></returns>
        Task<ListResultDto<ConnectFromModelDto>> ConnectFromModelDtoAsync();

        /// <summary>
        /// 根据条件查询
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task<PagedResultDto<RuKuQueryDto>> GetListByConditionRuKuQueryAsync(RuKuQueryDto input);
        /// <summary>
        /// 新增入库单 同时添加基础表和明细表
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task AddRuKuWithDetailsAsync(CreateRuKuWithDetailsDto input);
        /// <summary>
        /// 修改入库单 同时修改基础表和明细表
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task UpdateRuKuWithDetailsAsync(CreateRuKuWithDetailsDto input);
        /// <summary>
        /// 删除入库单 同时删除基础表和明细表
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task DeleteRuKuWithDetailsAsync(Guid id);
    }
}
